From f497950f3f6e52282b5ba70c3d95dace15785417 Mon Sep 17 00:00:00 2001 From: "kaf24@firebug.cl.cam.ac.uk[kaf24]" Date: Sat, 30 Apr 2005 15:19:31 +0000 Subject: [PATCH] bitkeeper revision 1.1389.1.18 (4273a203Crs6SOBhDcJcXdza1-0gNw) dump-enable.patch Dump guest core if enable-dump is set. Signed-off-by: Kip Macy --- tools/python/xen/xend/XendDomain.py | 2 ++ tools/python/xen/xend/XendRoot.py | 3 +++ 2 files changed, 5 insertions(+) diff --git a/tools/python/xen/xend/XendDomain.py b/tools/python/xen/xend/XendDomain.py index 7f5218bff1..93d66725f0 100644 --- a/tools/python/xen/xend/XendDomain.py +++ b/tools/python/xen/xend/XendDomain.py @@ -255,6 +255,8 @@ class XendDomain: eserver.inject('xend.domain.exit', [name, id, reason]) self.domain_restart_schedule(id, reason) else: + if xroot.get_enable_dump() == 'true': + xc.domain_dumpcore(dom = int(id), corefile = "/var/xen/dump/%s.%s.core"%(name,id)) eserver.inject('xend.domain.exit', [name, id, 'crash']) destroyed += 1 self.final_domain_destroy(id) diff --git a/tools/python/xen/xend/XendRoot.py b/tools/python/xen/xend/XendRoot.py index c8236a4ecd..815cb88dfb 100644 --- a/tools/python/xen/xend/XendRoot.py +++ b/tools/python/xen/xend/XendRoot.py @@ -255,6 +255,9 @@ class XendRoot: def get_network_script(self): return self.get_config_value('network-script', 'network') + def get_enable_dump(self): + return self.get_config_value('enable-dump', 'false') + def get_vif_bridge(self): return self.get_config_value('vif-bridge', 'xen-br0') -- 2.30.2